Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix null safety in filepickerdelegate #1615

Merged

Conversation

Lilian-C
Copy link

No description provided.

outputStream.write(bytes);
outputStream.flush();
outputStream.close();
if (data != null) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use an early return instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I fixed it :)

@Lilian-C Lilian-C force-pushed the fix-file-picker-delegate-nullsafety branch from e0c9603 to 0bcc22d Compare October 18, 2024 21:47
@Lilian-C Lilian-C force-pushed the fix-file-picker-delegate-nullsafety branch from 0bcc22d to 141cc3f Compare October 18, 2024 21:53
@@ -85,6 +85,8 @@ public boolean onActivityResult(final int requestCode, final int resultCode, fin
// Save file
if (requestCode == SAVE_FILE_CODE) {
if (resultCode == Activity.RESULT_OK) {
if (data == null)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the other if's also use curly braces, can you do that here as well?

Also, if you update the patch version and add an entry in the changelog, then this can be published.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I added all of this

@Lilian-C Lilian-C force-pushed the fix-file-picker-delegate-nullsafety branch from e945fa3 to e090801 Compare October 18, 2024 22:41
@navaronbracke navaronbracke merged commit 36eccd1 into miguelpruivo:master Oct 19, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants